/**
 * 
 */
package com.alkandros.linesmash.ui.signup;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;

import com.alkandros.linesmash.R;
import com.alkandros.linesmash.location.ILocationCallBack;
import com.alkandros.linesmash.ui.BaseActivity;

/**
 * @author Jiju Induchoodan
 *
 */
public class PaymentSelection extends BaseActivity implements OnClickListener,ILocationCallBack{

	private Intent intent;
	private LinearLayout linearTwo;
	private LinearLayout linearOne;
	private RelativeLayout linearThree;
	private RelativeLayout relativeLocation;
	private RelativeLayout masonMoney;
	private RelativeLayout creditCard;
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_action_selection);
		initialiseUI();
	}
	
	private void initialiseUI()
	{
		setHeading(R.string.payment_selection);
		setLeftButton();
		setRightButton();
		relativeLocation = (RelativeLayout)findViewById(R.id.relative_location);
		linearOne   	 = (LinearLayout)findViewById(R.id.linear_one);
		linearTwo   	 = (LinearLayout)findViewById(R.id.linear_two);
		linearThree   	 = (RelativeLayout)findViewById(R.id.relative_three);
		creditCard  	 = (RelativeLayout)findViewById(R.id.relative_credit_card);
		masonMoney	     = (RelativeLayout)findViewById(R.id.relative_mason);
		
		linearOne.setVisibility(View.GONE);
		
		linearThree.setVisibility(View.VISIBLE);
		linearTwo.setVisibility(View.INVISIBLE);
		relativeLocation.setVisibility(View.INVISIBLE);
		
		creditCard.setOnClickListener(this);
		masonMoney.setOnClickListener(this);
	}
	@Override
	public void onClick(View v) 
	{
		if(v==creditCard)
		{
			intent   =  new Intent(PaymentSelection.this,PaymentDetailsCreditCard.class);
			intent.putExtra("checkoutmode", false);
			startActivity(intent);
		}
		else if(v==masonMoney)
		{
			intent   =  new Intent(PaymentSelection.this,PaymentDetails.class);
			startActivity(intent);
		}
	}

	/* (non-Javadoc)
	 * @see com.alkandros.linesmash.location.ILocationCallBack#setResult(java.lang.String)
	 */
	@Override
	public void setResult(String address) {
		// TODO Auto-generated method stub
		
	}

}
